<h3>Details</h3>
<table>
  <tbody>
    <tr>
      <td class="header">Title</td>
      <td>
        <%= @result.title %>
        <% if @result.content.present? %>
          (<a href="#" data-reveal-id="contents-modal">View Contents</a>)
          <div id="contents-modal" class="reveal-modal" data-reveal>
            <h3>Result Contents</h3>
            <p><%= @result.content %></p>
          </div>
        <% end %>
      </td>
    </tr>
    <tr>
      <td class="header">URL</td>
      <td><%= link_to @result.url, @result.url, data: {confirm: "Are you sure? This will take you to a potentially dangerous site!\n\nURL: " + @result.url.to_s}, target:"_blank"  %></td>
    </tr>
    <tr>
      <td class="header">Identified</td>
      <td><%= time_ago_in_words(@result.created_at) + " ago" %></td>
    </tr>
    <% @result.metadata.keys.each do |key| %>
      <%= render partial: "results/metadata/#{key}_row" rescue nil %>
    <% end %>

  </tbody>
</table>

<% @result.metadata.keys.each do |key| %>
  <%= render partial: "results/metadata/#{key}_details" rescue nil %>
<% end %>